<template>
  <div class="home">
    <HelloWorld msg="Welcome to Your Vue.js App" />

    <child @parentHandler="handler" />
    <div style="height: 1000px"></div>
  </div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from "@/components/HelloWorld.vue";
import child from "@/components/Child.vue";

export default {
  data() {
    return {};
  },
  created() {
    console.log(111);
  },
  name: "HomeView",
  components: {
    HelloWorld,
    child,
  },
  methods: {
    handler(val) {
      console.log(val);
    },
  },
};
</script>
<style>
.box {
  height: 10000px;
  background: #ccc;
}
</style>
